from django.db import models


# Create your models here.
class FairyCategory(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=24)
    icon = models.CharField(max_length=16)
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 't_fairy_category'

class FairyDetail(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=64)
    category_id = models.IntegerField()
    content = models.TextField()
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 't_fairy_detail'

class ChineseCharacter(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=2)
    content = models.TextField()
    create_time = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = 't_chinese_character'